package com.ias.agdis_r.bean.other;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;

public class AppVName {
	public static int uVersion;
	public static String aName;
	public static void getAppVName(Context context){
		PackageManager pm = context.getPackageManager();
		try {
			PackageInfo pi = pm.getPackageInfo(context.getPackageName(), 0);
			AppVName.aName = pi.versionName;
			AppVName.uVersion = pi.versionCode;
		} catch (NameNotFoundException e) {
			AppVName.aName = "none";
			AppVName.uVersion = -1;
			e.printStackTrace();
		}
	}
}
